package com.dsg.dao.apply;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsg.entity.apply.DsgApplyCard;
import com.dsg.entity.apply.DsgApplyCus;
import com.dsg.entity.dto.ApplyList;
import com.dsg.entity.dto.CusResultDto;
import com.dsg.entity.dto.CusSearchDto;
import com.dsg.entity.dto.CusSumDto;
import com.dsg.util.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 個人申請資料 Mapper 接口
 * </p>
 *
 * @author system
 * @since 2020-07-04
 */
@Repository
public interface DsgApplyCusMapper extends BaseDao<DsgApplyCus> {

    Page<ApplyList> applyList(Page<ApplyList> page, Integer appType, String appNo, Integer appStatus, String carNo, String cusNo, String entCode, Integer keepType);

    List<CusResultDto> selectByKeepType(CusSearchDto dto);

    List<CusResultDto> selectApplyCus(CusSearchDto dto);

    CusSumDto selectCus(String cusNo);

    String getOwnsIdByCusNo(String cusNo);

    List<String> selectApplyList();

    /**
     * 客戶和公司編號下拉
     * @param entCode
     * @param cusStatus
     * @return
     */
    List<DsgApplyCus> getCusAndComNoList(String entCode,Integer cusStatus);

    /**
     * 客戶油咭編號下拉
     *
     * @param entCode
     * @param cusNo
     * @return
     */
    List<DsgApplyCard> getCusAndComCardNoList(String entCode, String cusNo);
}
